﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace BasicForms
{
    public partial class FrmWarning : BasicForms.FrmBase
    {
        #region Title property
        public string Title
        {
            get
            {
                return this.Text;
            }
            set
            {
                this.Text = value;
            }
        }
        #endregion

        #region Content property
        public string Content
        {
            get
            {
                return txtWarningContent.Text;
            }
            set
            {
                txtWarningContent.Text = value;
            }
        }
        #endregion


        private FrmWarning()
        {
            InitializeComponent();
            this.AcceptButton = btnClose;
        }

        public static void Show(string title, string content)
        {
            FrmWarning frm = new FrmWarning();
            frm.Title = title;
            frm.Content = content;

            frm.ShowDialog();
        }

        public static void Show(string content)
        {
            FrmWarning frm = new FrmWarning();
            frm.Content = content;

            frm.ShowDialog();
        }
    }
}
